package com.t10;

/**
 * Created by xuyiwei on 2018/7/21.
 */
public class Parcel2 {
    class Contents{
        private int i = 11;
        public int value(){return i;}
    }
    class Destination{
        private String label;
        public Destination(String whereTo) {
            this.label = whereTo;
        }
        String readLable(){return label;}
    }
    public Destination to(String s){
        return new Destination(s);
    }
    public Contents contents(){
        return new Contents();
    }
    public void ship(String dest){
        Contents contents  = contents();
        Destination d = to(dest);
        System.out.println(d.readLable());
    }
    public static void main(String[] args) {
        Parcel2 p = new Parcel2();
        p.ship("Tasmania");
        Parcel2.Contents c = p.contents();
        Parcel2.Destination d = p.to("Borneo");
    }
}
